﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace FootballCourt.Data.Abstract
{
    public interface IBaseRepository<T>
    {
        //Get T by key
        T Get(object key);

        //Get T by lamda expression
        T Get(Expression<Func<T, bool>> predicate);

        //Get all T
        IEnumerable<T> GetAll();
        IEnumerable<T> GetAll(Expression<Func<T, bool>> predicate);

        void Update(T entity);
        void Delete(T entity);
        void Insert(T entitty);

    }
}
